import request from '@/utils/request'

// 作品集列表
export const getCompositionList = (query) => {
    return request({
        url: '/arts/note/composition/list',
        method: 'get',
        params: query
    })
}

// 新增作品集
export function addComposition(data) {
    return request({
        url: '/arts/note/composition/add',
        method: 'post',
        data: data
    })
}

// 修改作品集
export function updateComposition(data) {
    return request({
        url: '/arts/note/composition/edit',
        method: 'put',
        data: data
    })
}

// 删除作品集
export function delComposition(id) {
    return request({
        url: '/arts/note/composition/delete/' + id,
        method: 'delete'
    })
}

// 查询作品集详细
export function getComposition(id) {
    return request({
        url: '/arts/note/composition/info/' + id,
        method: 'get'
    })
}

// 查询文章管理列表
export function getArticleTree(query) {
    return request({
        url: '/arts/note/art/tree',
        method: 'get',
        params: query
    })
}

// 查询文章管理详细
export function getArticle(id) {
    return request({
        url: '/arts/note/art/info/' + id,
        method: 'get'
    })
}

// 新增文章管理
export function addArticle(data) {
    return request({
        url: '/arts/note/art/add',
        method: 'post',
        data: data
    })
}

// 修改文章管理
export function updateArticle(data) {
    return request({
        url: '/arts/note/art/edit',
        method: 'put',
        data: data
    })
}

// 删除文章管理
export function delArticle(id) {
    return request({
        url: '/arts/note/art/delete/' + id,
        method: 'delete'
    })
}

// 移动文章
export function moveArticle(data) {
    return request({
        url: '/arts/note/art/move',
        method: 'post',
        data: data
    })
}
